home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / misc / pcduo102.zip / @PCDUO.ZIP / STARTSLV.BA_ / STARTSLV.BA
Text File  |  1994-09-20  |  5KB  |  134 lines

  1. @ECHO OFF
  2. SET PCDDRIVE=
  3.  
  4. REM Edit the above SET command if you wish to run the PC-Duo Slave from a
  5. REM drive other than your current default, or if you want to load it from
  6. REM a subdirectory. E.g. SET PCDDRIVE=D:\TOOLS will load the Slave from the
  7. REM D:\TOOLS\PCDUO area.
  8.  
  9. ECHO -------------------------------------------------------------------------------
  10. ECHO *                        Starting the PC-Duo DOS Slave
  11. ECHO *                                 PC-Duo v1.02
  12. ECHO *                 Copyright 1994 PCI, Vector Networks Limited
  13.  
  14. REM Last update : DB 20-Sep-94
  15.  
  16. REM Make sure we have got either the IPX or the NetBIOS Slave program.
  17. REM Which is determined by environment variable PCDNW. This is prepended to
  18. REM "SLAVE". If it is undefined or empty, we load the NetBIOS Slave SLAVE.EXE.
  19. REM If it is set to "IP", then we load the IPX Slave IPSLAVE.EXE.
  20.  
  21. if exist %PCDDRIVE%\PCDUO\%PCDNW%SLAVE.EXE goto IMAGEOK
  22.  
  23. ECHO *
  24. ECHO * ERROR : Unable to find the PC-Duo Slave program in %PCDDRIVE%\PCDUO.
  25. ECHO *
  26. goto BADSLV
  27.  
  28. :IMAGEOK
  29.  
  30. REM We have found the image OK. Now we check for any setup batch file, and
  31. REM execute it first if we find it
  32.  
  33. if not exist %PCDDRIVE%\PCDUO\STARTSL1.BAT goto SETUPDONE
  34.  
  35. REM Assume that we are not expected to delete this file automatically
  36. SET PCDTIDY=
  37.  
  38. CALL %PCDDRIVE%\PCDUO\STARTSL1
  39.  
  40. REM Now see if we are supposed to wipe that file, now that it's been executed
  41.  
  42. if %PCDTIDY%. == . goto SETUPDONE
  43.  
  44. DEL %PCDDRIVE%\PCDUO\STARTSL1.BAT
  45. SET PCDTIDY=
  46.  
  47. :SETUPDONE
  48.  
  49. REM Now prepare to load the Slave. If this is a standalone workstation with no
  50. REM network connection, LOCALIPX and IP- or NBBRIDGE must be loaded already.
  51.  
  52. REM We default to using the auto-name option which derives the Slave's name
  53. REM from the DOS Machine Name. This is normally appropriate for NetBIOS-based
  54. REM networks, such as PATHWORKS and LAN Manager. If you are using PC-Duo on
  55. REM a NetWare network, the DOS Machine Name is often not set, so you will
  56. REM have to specify a name explicitly to allow the Slave to load. You can
  57. REM do this by editing this batch file, or, preferably, by using the
  58. REM 'environment variable' approach that is recommended for local configuration
  59. REM of individual PCs.
  60. REM
  61. REM If you set the PCDCMD environment variable before calling this batch file,
  62. REM it will be inserted at the front of the Slave command, in place of the
  63. REM "*" for the automatic name determination. This allows you to have a wide
  64. REM range of PCs all using the same STARTSLV (either physically the same, by
  65. REM loading it from a server), but with local configuration changes
  66. REM established where necessary. Editing this file allows you to change the
  67. REM options that are applied to _all_ PCs. Setting PCDCMD allows you to define
  68. REM extras for individual PCs, as required.
  69. REM
  70. REM For instance, setting PCDCMD to "fred *" before CALLing this batch file
  71. REM will cause the Slave to be started with the default options, but
  72. REM specifying a Slave name of "fred", and requiring the user on this PC to
  73. REM acknowledge any attempts to connect. This can also be used to set
  74. REM individual passwords, such as setting PCDCMD to "* 1234567" will auto-name
  75. REM and require a matching (un-encrypted) password to allow connection. For
  76. REM example, this can be done with following lines inserted in AUTOEXEC.BAT:-
  77. REM
  78. REM SET PCDCMD=* 1234567
  79. REM CALL \PCDUO\STARTSLV
  80. REM
  81. REM If you want to change the default Slave options, you should edit the
  82. REM following line which sets PCDOPTS. For instance, if you want to have all
  83. REM PCs to run with File Transfer and Broadcast Messages disabled, you could
  84. REM use SET PCDOPTS=/f /i
  85. REM The default options are to use the defaults from Slave itself.
  86.  
  87. SET PCDOPTS=
  88.  
  89. if %PCDCMD%. == . goto DEFAULTCMD
  90.  
  91. REM We are using a non-default command, perhaps to specify auto-naming with
  92. REM a password
  93.  
  94. %PCDDRIVE%\PCDUO\%PCDNW%SLAVE %PCDCMD% %PCDOPTS%
  95. if not errorlevel 1 goto STARTOK
  96. goto BADSLV
  97.  
  98. :DEFAULTCMD
  99. REM We are going to start the Slave with the default command (auto-naming),
  100. REM and with the default options (set with PCDOPTS above)
  101.  
  102. %PCDDRIVE%\PCDUO\%PCDNW%SLAVE * %PCDOPTS%
  103. if not errorlevel 1 goto STARTOK
  104.  
  105. :BADSLV
  106. ECHO *                 An error occurred starting the PC-Duo Slave.
  107. ECHO -------------------------------------------------------------------------------
  108. pause
  109. goto END
  110.  
  111. :STARTOK
  112. REM Now we check for any other procedure to be executed now that we've got the
  113. REM Slave loaded happily. See the comments for STARTSL1 for more explanation.
  114.  
  115. if not exist %PCDDRIVE%\PCDUO\STARTSL2.BAT goto TWEAKDONE
  116. SET PCDTIDY=
  117. CALL %PCDDRIVE%\PCDUO\STARTSL2
  118. if %PCDTIDY%. == . goto TWEAKDONE
  119. DEL %PCDDRIVE%\PCDUO\STARTSL2.BAT
  120. SET PCDTIDY=
  121.  
  122. :TWEAKDONE
  123.  
  124. ECHO *                      PC-Duo Slave loaded successfully.
  125. ECHO -------------------------------------------------------------------------------
  126.  
  127. REM Delete environment variables before exiting.
  128.  
  129. :END
  130. SET PCDDRIVE=
  131. SET PCDCMD=
  132. SET PCDNW=
  133. SET PCDOPTS=
  134.